package org.example.servlet.support;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

@ComponentScan(basePackages = "org.example.controller")
public class DefaultAnnotationConfigDispatcherServletInitializer  extends AbstractAnnotationConfigDispatcherServletInitializer {
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[] {getClass()};
    }

    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class[] {
                getClass()
        };
    }

    @Override
    protected String[] getServletMappings() {
        return new String[] {"/"};
    }
}
